import {Component, OnInit} from '@angular/core';
import {MenuService} from '../lib/service/admin/menu.service';
import {PAGES_MENU} from './menu';
import {OauthService} from '../lib/service/oauth.service';
import {Router, Routes} from '@angular/router';

@Component({
  selector: 'app-admin',
  templateUrl: './admin.component.html',
  styleUrls: ['./admin.component.scss'],
})
export class AdminComponent implements OnInit {

  constructor(private menuService: MenuService, private router: Router, private oauthService: OauthService) {
    /*if (!this.menuService.menus || this.menuService.menus === null) {
      this.menuService.getMenu().subscribe(res => {
        // this.menuService.updateMenu(res.data);
        this.menuService.eventbus.emit({
          type: 2,
          url: PAGES_MENU
        });
      });d
    }*/

   /* if (!this.menuService.menus || this.menuService.menus === null) {
      // this.menuService.updateMenu([]);
      console.log('MMMMM');
      this.menuService.eventbus.emit({
        type: 2,
        url: PAGES_MENU
      });
    }*/
  }

  ngOnInit() {

  }

}
